/*
 * @Description: 品牌名称示例
 * @Author: iamsmiling
 * @Date: 2021-06-08 06:19:27
 * @LastEditTime: 2021-06-09 22:36:04
 */
/*
 * @Description: 标题示例
 * @Author: iamsmiling
 * @Date: 2021-06-07 22:20:20
 * @LastEditTime: 2021-06-08 06:16:22
 */
import 'package:credit_business_circle/R/R.dart';
import 'package:credit_business_circle/components/dialog_wrapper/dialog_wrapper.dart';
import 'package:flutter/material.dart';

Future showBrandDemoDialog(BuildContext context) {
  // RenderBox renderBox = context.findRenderObject() as RenderBox;
  // Rect box = renderBox.localToGlobal(Offset.zero) & renderBox.size;

  return showDialog(
      context: context,
      builder: (BuildContext context) {
        return DialogWrapper(builder: (BuildContext context) {
          return Stack(
            children: [
              Container(
                margin: EdgeInsets.only(
                    bottom: R.dimen.dp40,
                    right: R.dimen.dp24,
                    top: R.dimen.dp24),
                padding:
                    EdgeInsets.only(left: R.dimen.dp24, bottom: R.dimen.dp40),
                child: Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  mainAxisSize: MainAxisSize.min,
                  children: [
                    Text(
                      "品牌名称示例",
                      style: TextStyle(
                          fontSize: R.dimen.sp16,
                          color: R.color.ff222222,
                          fontWeight: FontWeight.w600),
                    ),
                    Container(
                      margin: EdgeInsets.only(top: R.dimen.dp36),
                      child: Image.asset(R.image.brandDemo),
                    ),
                  ],
                ),
              ),
              Positioned(
                  left: R.dimen.dp36,
                  bottom: R.dimen.dp40,
                  child: Container(
                    child: Column(
                      crossAxisAlignment: CrossAxisAlignment.start,
                      children: [
                        Image.asset(R.image.upArrow),
                        Container(
                          child: Text(
                            "品牌名称显示位置",
                            style: TextStyle(
                                color: R.color.fff88c0e,
                                fontSize: R.dimen.sp16,
                                fontWeight: FontWeight.w500),
                          ),
                        ),
                      ],
                    ),
                  )),
            ],
          );
        });
      });
}
